import { configDefaults, defineConfig } from 'vitest/config';
import viteConfig from './vite.config';
import { fileURLToPath } from 'node:url';

export default defineConfig((configEnv) => {
    const config = viteConfig(configEnv);
    // 添加 vitest 特定配置
    config.test = {
        environment: 'jsdom',
        exclude: [...configDefaults.exclude, 'e2e/**'],
        root: fileURLToPath(new URL('./', import.meta.url)),
    };
    return config;
});
